<?php
/**
 * 
 * @authors Your Name (you@example.org)
 * @date    2018-12-06 17:18:34
 * @version $Id$
 */

include "dataConfig.php";


if(isset($_REQUEST["uname"])){

    $UNAME = $_REQUEST["uname"];

    // sql
    $sql = "SELECT * FROM userinfo WHERE uname=?";
    // 预处理sql
    $stmt = $conn->prepare($sql);
    // 参数化
    $stmt->bind_param("s", $UNAME);
    // 执行
    $stmt->execute();
    // 取结果
    $result = $stmt->get_result();
    // 判断结果
    if($result->num_rows>=1){
        print_r("false");
    }else{
        print_r("true");
    }

}